package com.tongna.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * TenantDemo
 *
 * @author 张浩伟
 * @version 1.01 2018年02月10日
 */
@Controller
public class IndexController {

    @GetMapping
    public String index(HttpServletRequest request){
        if ("www.domain.com".equals(request.getServerName())){
            return "index";
        }
        return "redirect:/news/list";
    }

}
